package com.yx.fx.sys.web.model.save;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

/**
 * @author 杨智杰
 * @since 2021/8/19 13:36
 */
@Data
@Accessors(chain = true)
@ApiModel(value = "新增菜单数据模型")
public class SaveMenu {

    @ApiModelProperty(value = "上级菜单Id")
    private Long pid = 0L;

    @NotBlank
    @Length(max = 32)
    @ApiModelProperty(value = "菜单名", required = true)
    private String name;

    @NotBlank
    @Length(max = 256)
    @ApiModelProperty(value = "路由地址", required = true)
    private String path;

    @NotBlank
    @Length(max = 64)
    @ApiModelProperty(value = "图标", required = true)
    private String icon;

    @ApiModelProperty(value = "类型")
    private Integer type = 1;

    @NotBlank
    @Length(max = 64)
    @ApiModelProperty(value = "权限字符")
    private String authStr;

    @ApiModelProperty(value = "是否隐藏")
    private Boolean isHide = false;

    @ApiModelProperty(value = "当前状态")
    private Integer status = 1;

    @ApiModelProperty(value = "排序")
    private Integer sort = 1;

    @Length(max = 256)
    @ApiModelProperty(value = "外链地址")
    private String link;

}
